package com.project.base.baseproject.Activity.BaseActivity;

import android.support.v7.app.AppCompatActivity;
import android.os.Bundle;
import android.view.MotionEvent;

//基础界面 主要用于三方库（如：百度统计、bugtags使用）
public class BaseActivity extends AppCompatActivity {
    //用来判断APP是不是运行在前台
    static int activityCount = 0;
    //用来判断APP是不是运行在前台
    public static boolean runInForeground() {
        return activityCount != 0;
    }
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
    }
    @Override
    protected void onPause() {
        super.onPause();
    }
    @Override
    protected void onResume() {
        super.onResume();
    }
    @Override
    protected void onStart() {
        super.onStart();
        activityCount ++;
    }
    @Override
    protected void onStop() {
        super.onStop();
        activityCount --;
    }
    @Override
    protected void onDestroy() {
        super.onDestroy();
    }
    @Override
    public boolean dispatchTouchEvent(MotionEvent ev) {
        return super.dispatchTouchEvent(ev);
    }
    @Override
    protected void onSaveInstanceState(Bundle outState) {
        super.onSaveInstanceState(outState);
    }
}
